Accusoft.PdfXpress6.ActiveX
View PDF

ImagXpress® can be used in conjunction with PDF Xpress™ to display PDF pages. Assign bitmaps rendered using PDF Xpress to an ImagXpress object to leverage its image-viewing features.

To view a PDF document page:

  1. Create a PdfDocument object for an existing PDF document.
  2. Create a RenderOptions object to select an area of the PDF page and the target resolution.
  3. Invoke RenderPageOptionsToDib to produce a DIB handle.
  4. Assign the DIB handle to the ImagXpress property hDIB to view the rendered area in ImagXpress.
VB Example
Copy Code
'This code demonstrates viewing a PDF file 
On Error GoTo error
Dim imagXpress1 As ImagXpress
Dim pdfxpress1 As PdfXpress
pdfxpress1.Initialize
pdfxpress1.RaiseExceptions = True
Dim document As New PdfDocument
document.SetParentControl pdfxpress1
document.OpenDocument "C:\test.pdf",""
Dim renderOpts As New RenderOptions
rendOptions.HorizontalResolution = 300
rendOptions.VerticalResolution = 300
imagXpress1.hDIB = document.RenderPageOptionsToDib(0, rendOptions)
.
.
.
GoTo finish
error:
MsgBox Err.Description
finish:

Set document = Nothing
pdfxpress1.Terminate
Set pdfxpress1= Nothing

 

See Also

 

 


©2014. Accusoft Corporation. All Rights Reserved.

Send Feedback